import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';

@Injectable({
  providedIn: 'root'
})
export class SecondPriceChangeService {
  serviceUrls = {
    getPriceChangeUrl: '/recycleGoods/getPrice', // 查询改价信息
    updatePriceUrl: '/recycleGoods/updatePrice', // 改价
  }

  constructor(public httpClient: HttpClient) { }

  // 查询改价信息
  getPriceChangeData(params: any) {
    return this.httpClient.post(this.serviceUrls.getPriceChangeUrl, params).toPromise();
  }

  // 改价提交
  updatePriceData(params: any) {
    return this.httpClient.post(this.serviceUrls.updatePriceUrl, params).toPromise();
  }
}
